package com.chenfan.mcn.model.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author wulg
 * @date 2023/1/3
 */
@Data
public class IntentionOrderAcceptDTO {

    /**
     * 意向单ID
     */
    @NotNull(message = "意向单ID不能为空")
    private Long id;

    /**
     * （接单/拒单）备注
     */
    @Length(max = 500, message = "接单备注最大长度不能超过500")
    private String acceptRemark;

    /**
     * 询单问题回答
     */
    @Valid
    private List<IntentionOrderAnswer> answerList;


    /**
     * 意向单问题回答
     */
    @Data
    public static class IntentionOrderAnswer {

        @NotNull(message = "询单问题ID不能为空")
        private Long questionId;

        private String answer;
    }
}
